<template>
  <div>
    <input type="text" v-model="msg">
    <button @click="add">add</button>
  </div>
</template>
<script>
export default {
  data() {
    return {
      msg: 1
    }
  },
   methods: {
    add() {
      this.$store.commit("addList",this.msg)
    }
   }
}
</script>